import Router from 'koa-router'

import DlyLinkController from '../controller/dlyadmin/linkController'

const router = new Router()

router.prefix('/dlyadminapi/link')

router
	/**
	 * @swagger
	 * /dlyadminapi/link/created:
	 *   post:
	 *     description: 创建推广链接
	 *     tags: [后台用户]
	 *     summary: "创建推广链接"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
	.post('/created', DlyLinkController.created)
    /**
	 * @swagger
	 * /dlyadminapi/link/list:
	 *   get:
	 *     description: 获取推广链接列表
	 *     tags: [后台用户]
	 *     summary: "获取推广链接列表"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
	.get('/list', DlyLinkController.list)
    /**
	 * @swagger
	 * /dlyadminapi/link/update:
	 *   put:
	 *     description: 修改推广链接状态
	 *     tags: [后台用户]
	 *     summary: "修改推广链接状态"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
	.put('/update/:id', DlyLinkController.update)
    /**
	 * @swagger
	 * /dlyadminapi/link/deleted:
	 *   put:
	 *     description: 删除推广链接
	 *     tags: [后台用户]
	 *     summary: "删除推广链接"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
	.delete('/deleted/:id', DlyLinkController.deleted)
    /**
	 * @swagger
	 * /dlyadminapi/link/binduser:
	 *   put:
	 *     description: 绑定用户链接
	 *     tags: [后台用户]
	 *     summary: "绑定用户链接"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
    .get('/binduser/:id', DlyLinkController.binduser)
    .get('/binduser', DlyLinkController.binduser)
    /**
	 * @swagger
	 * /dlyadminapi/link/saveUserProxy:
	 *   put:
	 *     description: 保存用户浏览器指纹，并绑定代理
	 *     tags: [后台用户]
	 *     summary: "保存用户浏览器指纹，并绑定代理"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
    .post('/saveUserProxy', DlyLinkController.saveUserProxy)
    /**
	 * @swagger
	 * /dlyadminapi/link/cheackUserProxy:
	 *   put:
	 *     description: 检查浏览器id与代理绑定情况
	 *     tags: [后台用户]
	 *     summary: "检查浏览器id与代理绑定情况"
	 *     parameters:

	 *     produces:
	 *       - application/json
	 *     responses:
	 *       200:
	 *         description: 获取数据列表
	 * */
    .get('/cheackUserProxy', DlyLinkController.cheackUserProxy)



export default router
